/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import dao.DAOBill;
import dao.DAOCuaHangProduct;
import dao.DAOKhachHang;
import dao.DAOListCuaHang;
import dao.DAOPersonnel;
import dao.DAOProduct;
import java.awt.event.ItemEvent;
import java.awt.event.MouseAdapter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import pojo.PersonnelDetail;
import pojo.*;

/**
 *
 * @author Thanh
 */
public class HoaDonBanHang extends javax.swing.JPanel {

    /**
     * Creates new form HoaDonBanHang
     */
    Integer tongtien = 0;
    private PersonnelDetail account= null;
    private String taikhoan = "";
    private DefaultTableModel model = new DefaultTableModel();
    public HoaDonBanHang(PersonnelDetail account,String taikhoan) {
        initComponents();
        this.account = account;
        this.taikhoan = taikhoan;
        DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
        Date date = new Date();
        lbDate.setText(dateFormat.format(date));
        //lbNameNV.setText(name);
        
        model.addColumn("Code Sản Phẩm");
        model.addColumn("Tên sản phẩm");
        model.addColumn("Giá Thành");
        model.addColumn("Số Lượng");
        model.addColumn("Khuyến Mãi");
        model.addColumn("Thành Tiền");
        tbHoaDon.setModel(model);
        lbTongCong.setText(sum + "VND");
        guestID = -1;
        
        //listBillDetail = new ArrayList<BillProductId>();
        this.lbNameNV.setText(this.account.getName());
        DAOListCuaHang daoListcuahang = new DAOListCuaHang();
        List<ListCuahang> dsCuaHang = daoListcuahang.getAll();
        for(int i=0;i<dsCuaHang.size();i++)
        {
            this.jComboBox1.addItem(dsCuaHang.get(i).getName());
        }
        this.lbTongCong.setText(tongtien.toString());
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        cbKHTT = new javax.swing.JCheckBox();
        tbIDKH = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        tbHoaDon = new javax.swing.JTable();
        btSearchKH = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLable7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        lbNameKH = new javax.swing.JLabel();
        lbSDT = new javax.swing.JLabel();
        lbPoint = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        lbTongCong = new javax.swing.JLabel();
        lbDate = new javax.swing.JLabel();
        lbNameNV = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        btThemSP = new javax.swing.JButton();
        tbIDSP = new javax.swing.JTextField();
        spSoLuong = new javax.swing.JSpinner();
        btInHoaDon = new javax.swing.JButton();
        btDelete = new javax.swing.JButton();
        jComboBox1 = new javax.swing.JComboBox();

        setPreferredSize(new java.awt.Dimension(1114, 495));

        jLabel1.setText("Ngày Tạo:");

        jLabel2.setText("Nhân Viên:");

        jLabel3.setText("Cửa Hàng:");

        jLabel4.setText("Khách Hàng:");

        jLabel5.setText("Danh Sách Mặt Hàng");

        cbKHTT.setText("Khách Hàng Thân Thiết");
        cbKHTT.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbKHTTItemStateChanged(evt);
            }
        });

        tbIDKH.setEnabled(false);

        tbHoaDon.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "STT", "Tên Sản Phẩm", "Giá Thành", "Số Lượng", "Khuyến Mãi", "Thành Tiền"
            }
        ));
        jScrollPane2.setViewportView(tbHoaDon);
        tbHoaDon.getAccessibleContext().setAccessibleName("");

        btSearchKH.setText("Tìm Kiếm");
        btSearchKH.setEnabled(false);
        btSearchKH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btSearchKHActionPerformed(evt);
            }
        });

        jLabel6.setText("Tên Khách Hàng:");

        jLable7.setText("Point:");

        jLabel8.setText("Loại thẻ");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jLable7)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbPoint)
                    .addComponent(lbSDT)
                    .addComponent(lbNameKH))
                .addContainerGap(316, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(lbNameKH))
                .addGap(27, 27, 27)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLable7)
                    .addComponent(lbSDT))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(lbPoint))
                .addGap(19, 19, 19))
        );

        lbNameKH.getAccessibleContext().setAccessibleName("lbNameKH");
        lbSDT.getAccessibleContext().setAccessibleName("lbSDTKH");
        lbPoint.getAccessibleContext().setAccessibleName("lbNgaySinh");

        jLabel12.setText("Tổng Cộng:");

        lbTongCong.setText("jLabel13");

        lbDate.setText("jLabel14");

        lbNameNV.setText("jLabel15");

        jLabel17.setText("Mã Sản Phẩm:");

        jLabel18.setText("Số Lượng:");

        btThemSP.setText("Thêm");
        btThemSP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btThemSPActionPerformed(evt);
            }
        });

        spSoLuong.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(1), Integer.valueOf(1), null, Integer.valueOf(1)));

        btInHoaDon.setText("In");
        btInHoaDon.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btInHoaDonActionPerformed(evt);
            }
        });

        btDelete.setText("Delete");
        btDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btDeleteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel17)
                            .addComponent(jLabel18))
                        .addGap(60, 60, 60)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbNameNV)
                            .addComponent(lbDate)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(cbKHTT)
                                .addGap(18, 18, 18)
                                .addComponent(tbIDKH, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(28, 28, 28)
                                .addComponent(btSearchKH))
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tbIDSP, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(spSoLuong, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(btThemSP, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(76, 76, 76))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLabel12)
                        .addGap(18, 18, 18)
                        .addComponent(lbTongCong)
                        .addGap(56, 56, 56)
                        .addComponent(btInHoaDon, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(217, 217, 217))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 739, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(btDelete)))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(lbDate))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(lbNameNV))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(cbKHTT)
                            .addComponent(tbIDKH, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btSearchKH)))
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel17)
                    .addComponent(tbIDSP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(spSoLuong, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(btThemSP))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel12)
                                    .addComponent(lbTongCong))
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(btInHoaDon)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(btDelete)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );

        cbKHTT.getAccessibleContext().setAccessibleName("cbKHTT");
        tbIDKH.getAccessibleContext().setAccessibleName("tbIDKH");
        btSearchKH.getAccessibleContext().setAccessibleName("btSearchKH");
        lbDate.getAccessibleContext().setAccessibleName("lbDate");
        lbNameNV.getAccessibleContext().setAccessibleName("lbNameNV");
        btThemSP.getAccessibleContext().setAccessibleName("btThemHoaDon");
        tbIDSP.getAccessibleContext().setAccessibleName("tbIDSP");
        spSoLuong.getAccessibleContext().setAccessibleName("spSoLuong");
    }// </editor-fold>//GEN-END:initComponents

    private void cbKHTTItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbKHTTItemStateChanged
        // TODO add your handling code here:
        if (evt.getStateChange() == ItemEvent.SELECTED) {
            tbIDKH.setEnabled(true);
            btSearchKH.setEnabled(true);
        } else {
            tbIDKH.setEnabled(false);
            btSearchKH.setEnabled(false);
            lbNameKH.setText("");
            lbPoint.setText("");
            lbSDT.setText("");
        }
    }//GEN-LAST:event_cbKHTTItemStateChanged

    private void btSearchKHActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSearchKHActionPerformed
        // TODO add your handling code here:
        if (tbIDKH.getText().equals("")) {
            JOptionPane.showMessageDialog(null, "Nhập Code Khách Hàng");
        } else {
            DAOKhachHang dao = new DAOKhachHang();
            Guest cus = dao.getGuestById(Integer.parseInt(tbIDKH.getText()));
            if (cus == null) {
                JOptionPane.showMessageDialog(null, "Không có tên khách hàng");
            } else {
                lbNameKH.setText(cus.getName());
                if(cus.getLoaiThe()==1)
                {
                    lbPoint.setText("Thành viên");
                }else
                {
                    lbPoint.setText("VIP");
                }
                
                lbSDT.setText(cus.getPoint().toString());
                guestID = cus.getIdGuest();
            }
        }
                
    }//GEN-LAST:event_btSearchKHActionPerformed
    private int i = 1;
    private int sum = 0;
    //private List<BillProductId> listBillDetail;
    private int guestID;
    private void btThemSPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btThemSPActionPerformed
        // TODO add your handling code here:
        if (tbIDSP.getText().equals("")) {
            JOptionPane.showMessageDialog(null, "Nhập Code Sản Phẩm");
        } else {
            if(TryParseInt(tbIDSP.getText())==null)
            {
                JOptionPane.showMessageDialog(null, "Bạn phải nhập mã sản phẩm là số");
            }else
            {
                boolean flag = false;
                for(int i=0;i<model.getRowCount();i++)
                {
                    if((Integer)model.getValueAt(i, 0) == Integer.parseInt(this.tbIDSP.getText()))
                    {
                        flag = true;
                    }
                }
                if(flag)
                {
                    JOptionPane.showMessageDialog(null, "Sản phẩm đã có trong hóa đơn");
                }else
                {
                    DAOListCuaHang daocuahang = new DAOListCuaHang();
                    ListCuahang cuahang = daocuahang.getCuaHangByName(this.jComboBox1.getSelectedItem().toString());
                    DAOCuaHangProduct daocuahangpro = new DAOCuaHangProduct();
                    CuahangProduct cuahangpro = daocuahangpro.getCuaHangProductById(cuahang.getId(), Integer.parseInt(this.tbIDSP.getText()));
                    if(cuahangpro == null)
                    {
                        JOptionPane.showMessageDialog(null, "Sản phẩm không có trong cửa hàng này");
                    }else
                    {
                        Integer soluong = (Integer)this.spSoLuong.getValue();
                        if(cuahangpro.getCount() - soluong < cuahangpro.getToithieuL())
                        {
                            JOptionPane.showMessageDialog(null, "Sản phẩm đã hết hoặc bạn mua quá số hàng tồn tối thiểu");
                        }else
                        {
                            DAOProduct dao = new DAOProduct();
                            Product pro = dao.getProductById(Integer.parseInt(tbIDSP.getText()));
                            Integer tien = (pro.getProPrice() - pro.getGiaGiam())*soluong;
                            model.addRow(new Object[]{pro.getId(),pro.getProName(),pro.getProPrice(),soluong,pro.getGiaGiam(),tien});
                            tongtien += tien;
                            this.lbTongCong.setText(tongtien.toString());
                        }
                    }
                }
            }
            
            
        }
    }//GEN-LAST:event_btThemSPActionPerformed
public static Integer TryParseInt(String someText) {
        try {
            return Integer.parseInt(someText);
        } catch (NumberFormatException ex) {
        return null;
        }
    }
    private void btDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btDeleteActionPerformed
        int[] select = this.tbHoaDon.getSelectedRows();
        for(int i=0;i<select.length;i++)
        {
            model.removeRow(select[i]);
        }
    }//GEN-LAST:event_btDeleteActionPerformed

    private void btInHoaDonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btInHoaDonActionPerformed
        // TODO add your handling code here:
        if(model.getRowCount()==0)
        {
            JOptionPane.showMessageDialog(null, "Không thể xuất hóa đơn không có sản phẩm nào");
        }else
        {
            Bill bill = new Bill();
            bill.setPerAccount(taikhoan);
            Date tem = new Date();
            bill.setDtimeBill(new Date());
            bill.setIdGuest(guestID);
            String cuahang = this.jComboBox1.getSelectedItem().toString();
            bill.setStore(cuahang);
            DAOListCuaHang daocuahang = new DAOListCuaHang();
            ListCuahang lisCuahang = daocuahang.getCuaHangByName(cuahang);
            bill.setAddress(lisCuahang.getDiachi());
            bill.setIsBlock(0);
            bill.setTongTien(Integer.parseInt(this.lbTongCong.getText()));
            
            List<BillProduct> dshang = new ArrayList<BillProduct>();
            List<CuahangProduct> dscuahangproductupdate = new ArrayList<CuahangProduct>();
            for(int i=0;i<model.getRowCount();i++)
            {
                BillProduct temp = new BillProduct();
                temp.setIdProduct((Integer)model.getValueAt(i, 0));
                temp.setCount((Integer)model.getValueAt(i,3));
                dshang.add(temp);
                CuahangProductId cuahangprotempid = new CuahangProductId(lisCuahang.getId(), (Integer)model.getValueAt(i, 0));
                CuahangProduct cuahangprotemp = new CuahangProduct();
                cuahangprotemp.setId(cuahangprotempid);
                cuahangprotemp.setCount((Integer)model.getValueAt(i,3));
                dscuahangproductupdate.add(cuahangprotemp);
            }
            DAOBill dao = new DAOBill();
            dao.saveBill(bill,dshang,dscuahangproductupdate);
        }
        
        //daoDetail.saveBillDetails(listBillDetail);
    }//GEN-LAST:event_btInHoaDonActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btDelete;
    private javax.swing.JButton btInHoaDon;
    private javax.swing.JButton btSearchKH;
    private javax.swing.JButton btThemSP;
    private javax.swing.JCheckBox cbKHTT;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLable7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel lbDate;
    private javax.swing.JLabel lbNameKH;
    private javax.swing.JLabel lbNameNV;
    private javax.swing.JLabel lbPoint;
    private javax.swing.JLabel lbSDT;
    private javax.swing.JLabel lbTongCong;
    private javax.swing.JSpinner spSoLuong;
    private javax.swing.JTable tbHoaDon;
    private javax.swing.JTextField tbIDKH;
    private javax.swing.JTextField tbIDSP;
    // End of variables declaration//GEN-END:variables
}
